<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试</title>
</head>
<body>
   <script src="ceshi.js"></script>
   <script>
   var set1 = new Set(1,2,3,2,1)
   console.log(set1)
   var set2 = new Set([1,2,3,2,1])
   console.log(set1.equals(set2))

   var set3= new Set([1,2,4,5,6,7,8]);
    console.log(set3.instersection(set2))
   
   var set4 = new Set([1,2,3,4,5,6,7,8,10,9])
  console.log(set3.union(set4));
   
     console.log((new Set(set1.union(set2)).instersection(set3)).equals(set4))

    	console.assert('')
    console.assert(set3.union(set4),'交集测试')
   </script>



</body>
</html>